package com.xqboss.apps.dto.market;

import com.xqboss.apps.enums.market.MarketTypeEnum;
import com.xqboss.apps.enums.nft.NftTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@ApiModel
public class AddMarketDto {

    @ApiModelProperty("支付密码")
    @NotNull(message = "支付密码不能为空")
    private String payPassword;

    @ApiModelProperty("源ID（用户装备ID、用户藏品ID、用户宝箱ID）")
    @NotNull(message = "源ID不能为空")
    private Long sourceId;

    @ApiModelProperty("出售类型")
    @NotNull(message = "出售类型不能为空")
    private MarketTypeEnum type;

    @ApiModelProperty("出售数量")
    @Min(value = 1, message = "出售数量至少为1")
    @NotNull(message = "出售数量不能为空")
    private Integer quantity;

    @ApiModelProperty("出售价格")
    @DecimalMin(value = "0.01", message = "出售价格至少为0.01")
    @NotNull(message = "价格不能为空")
    private BigDecimal price;
}
